
#include "rtc.h"

static struct rcc_lse_periph rtc_apb=
{
    RCC_BDCR_LSEON_Pos,
    RCC_PERIPHCLK_RTC,
    RCC_RTCCLKSOURCE_LSE,
    RCC_OSCILLATORTYPE_LSE,
    RCC_LSE_ON,
};

static struct rtc_device_data rtc_data={
    &rtc_apb,
    {
        RTC_IRQn,
        0,
        0,
    },
    {
        RTC_BASE,
        RTC_AUTO_1_SECOND,
        RTC_OUTPUTSOURCE_NONE,
    },
};

static struct device rtc_device={
    "/dev/rtc",
    "rtc",
     0,
    NULL,
    (sj_void *)&rtc_data,
};

static DEVICE_MODULE_INIT(rtc_device)
